<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        require_once 'configBD.php';

        $codigo = $_POST["codigo"];
        $nome = $_POST["nome"];
        $curso = $_POST["curso"];
        $vagas = $_POST["vagas"];
        $cargahoraria = $_POST["cargahoraria"];


        /* echo "$codigo 
          $nome
          $curso
          $vagas
          $cargahoraria"; */

        $query = "INSERT INTO disciplina(codigo, nome, curso, vagas, carga_horaria)
                    VALUES ('$codigo', '$nome', '$curso', '$vagas', '$cargahoraria');";

        mysql_query($query)
                or header("Location: cadastroDisciplina.php");

        mysql_close($conexao);

        header("Location: mainportal_cadastro.php");
        ?>
    </body>
</html>
